package com.hourse.app.config;

import com.hourse.app.service.impl.OkxWebSocketClient;

public class OkxWebSocketConfig {
    //ws  模拟盘
//    private static final String SERVICE_URL = "wss://ws.okex.com:8443/ws/v5/public?brokerId=9999";
    //ws  实盘
    //private static final String SERVICE_URL = "wss://ws.okex.com:8443/ws/v5/public";
    private static final String SERVICE_URL = "wss://wsaws.okex.com:8443/ws/v5/public";

    // api key
    private static final String API_KEY = "8eb8f8d2-3e1d-4098-9d9b-7c1648e3fc8b";
    private static final String SECRET_KEY = "C80F45392D6EAF93AFBF5DAAF77A13E8";
    private static final String PASSPHRASE = "1okxlight";



    public static void publicConnect(OkxWebSocketClient webSocketClient) {
        System.out.println(SERVICE_URL);
        OkxWebSocketClient.connection(SERVICE_URL);
    }

    public static void loginConnect(OkxWebSocketClient webSocketClient) {
        System.out.println(SERVICE_URL);
        //与服务器建立连接
        OkxWebSocketClient.connection(SERVICE_URL);
        //登录账号,用户需提供 api-key，passphrase,secret—key 不要随意透漏 ^_^
        OkxWebSocketClient.login(API_KEY , PASSPHRASE , SECRET_KEY);

    }
}
